import axios from 'axios'

const env = import.meta.env

const instance = axios.create({
  baseURL: env.VITE_API_BASE_URL,
  timeout: env.VITE_API_TIMEOUT
})

instance.interceptors.request.use((config) => config)
instance.interceptors.response.use((response) => response)

// 约定 src/http/index.ts 为默认的 http 请求实例
export default instance
